1. Field of the Invention
The present invention relates to a signal processing apparatus, and in particular, to coding process of an image signal.
2. Related Background Art
The MPEG standard is known as an image signal compression and coding technology.
In a coding circuit for coding the image signal and thereby generating data in accordance with the MPEG standard, a target code amount is determined for each picture based on a target data rate. And based on the target code amount of each picture, the target code amount is assigned equally to all the macro blocks constituting each picture.
Thereafter, a quantization step for coding each macro block is determined in order to obtain the target code amount, and then coding is performed.
Thus, if the quantization step is set by establishing the target code amount equally to each macro block, the following problems may be raised.
For instance, in the case where there are a macro block including an almost motionless image and a macro block including an image having large motion in one P or B picture, almost no difference data can be obtained from the macro block of the almost motionless image. For that reason, the quantization step for attaining the target code amount is set to be small.
Inversely, as for the macro block of the image large motion, the value of difference data is large so that the quantization step must be set to be large in order to render the code amount of the macro block smaller than the target code amount.
However, as for the almost motionless image, even if it is coded by rendering the quantization step smaller than necessary, this coding results in increase of the code amount, while this increase does not result in significant effect visually. On the other hand, as for the image having large motion, setting the quantization step to be small will result in significant effect visually. Nevertheless, the quantization step cannot be set to be small since such the smaller quantization step results in code amount that exceeds the target code amount set equally for each macro block.
Thus, the target code amount is assigned equally to each macro block in the prior art, and so it is impossible to assign a large code amount to a. portion which is less effective visually and assign a necessary code amount to a portion which is more effective visually.